home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsStyleConsts.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  30KB  |  702 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Mats Palmgren <mats.palmgren@bredband.net>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  27.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38. #ifndef nsStyleConsts_h___
  39. #define nsStyleConsts_h___
  40.  
  41. #include "nsFont.h"
  42.  
  43. // XXX fold this into nsStyleContext and group by nsStyleXXX struct
  44.  
  45. // Indices into border/padding/margin arrays
  46. #define NS_SIDE_TOP     0
  47. #define NS_SIDE_RIGHT   1
  48. #define NS_SIDE_BOTTOM  2
  49. #define NS_SIDE_LEFT    3
  50.  
  51. #define NS_FOR_CSS_SIDES(var_) for (PRInt32 var_ = 0; var_ < 4; ++var_)
  52.  
  53. // {margin,padding}-{left,right}-{ltr,rtl}-source
  54. #define NS_BOXPROP_SOURCE_PHYSICAL 0
  55. #define NS_BOXPROP_SOURCE_LOGICAL  1
  56.  
  57. // box-sizing
  58. #define NS_STYLE_BOX_SIZING_CONTENT       0
  59. #define NS_STYLE_BOX_SIZING_PADDING       1
  60. #define NS_STYLE_BOX_SIZING_BORDER        2
  61.  
  62. // float-edge
  63. #define NS_STYLE_FLOAT_EDGE_CONTENT       0
  64. #define NS_STYLE_FLOAT_EDGE_PADDING       1
  65. #define NS_STYLE_FLOAT_EDGE_BORDER        2
  66. #define NS_STYLE_FLOAT_EDGE_MARGIN        3
  67.  
  68. // key-equivalent
  69. #define NS_STYLE_KEY_EQUIVALENT_NONE      0
  70.  
  71. // user-focus
  72. #define NS_STYLE_USER_FOCUS_NONE            0
  73. #define NS_STYLE_USER_FOCUS_IGNORE          1
  74. #define NS_STYLE_USER_FOCUS_NORMAL          2
  75. #define NS_STYLE_USER_FOCUS_SELECT_ALL      3
  76. #define NS_STYLE_USER_FOCUS_SELECT_BEFORE   4
  77. #define NS_STYLE_USER_FOCUS_SELECT_AFTER    5
  78. #define NS_STYLE_USER_FOCUS_SELECT_SAME     6
  79. #define NS_STYLE_USER_FOCUS_SELECT_MENU     7
  80.  
  81. // user-select
  82. #define NS_STYLE_USER_SELECT_NONE       0
  83. #define NS_STYLE_USER_SELECT_TEXT       1
  84. #define NS_STYLE_USER_SELECT_ELEMENT    2
  85. #define NS_STYLE_USER_SELECT_ELEMENTS   3
  86. #define NS_STYLE_USER_SELECT_ALL        4
  87. #define NS_STYLE_USER_SELECT_TOGGLE     5
  88. #define NS_STYLE_USER_SELECT_TRI_STATE  6
  89. #define NS_STYLE_USER_SELECT_AUTO       7 // internal value - please use nsFrame::IsSelectable()
  90. #define NS_STYLE_USER_SELECT_MOZ_ALL    8 // force selection of all children, unless an ancestor has NONE set - bug 48096
  91. #define NS_STYLE_USER_SELECT_MOZ_NONE   9 // Like NONE, but doesn't change selection behavior for descendants whose user-select is not AUTO.
  92.  
  93. // user-input
  94. #define NS_STYLE_USER_INPUT_NONE      0
  95. #define NS_STYLE_USER_INPUT_ENABLED   1
  96. #define NS_STYLE_USER_INPUT_DISABLED  2
  97. #define NS_STYLE_USER_INPUT_AUTO      3
  98.  
  99. // user-modify
  100. #define NS_STYLE_USER_MODIFY_READ_ONLY   0
  101. #define NS_STYLE_USER_MODIFY_READ_WRITE  1
  102. #define NS_STYLE_USER_MODIFY_WRITE_ONLY  2
  103.  
  104. // box-align
  105. #define NS_STYLE_BOX_ALIGN_STRETCH     0
  106. #define NS_STYLE_BOX_ALIGN_START       1
  107. #define NS_STYLE_BOX_ALIGN_CENTER      2
  108. #define NS_STYLE_BOX_ALIGN_BASELINE    3
  109. #define NS_STYLE_BOX_ALIGN_END         4
  110.  
  111. // box-pack
  112. #define NS_STYLE_BOX_PACK_START        0
  113. #define NS_STYLE_BOX_PACK_CENTER       1
  114. #define NS_STYLE_BOX_PACK_END          2
  115. #define NS_STYLE_BOX_PACK_JUSTIFY      3
  116.  
  117. // box-direction
  118. #define NS_STYLE_BOX_DIRECTION_NORMAL    0
  119. #define NS_STYLE_BOX_DIRECTION_REVERSE   1
  120.  
  121. // box-orient
  122. #define NS_STYLE_BOX_ORIENT_HORIZONTAL 0
  123. #define NS_STYLE_BOX_ORIENT_VERTICAL   1
  124.  
  125. // Azimuth - See nsStyleAural
  126. #define NS_STYLE_AZIMUTH_LEFT_SIDE        0x00
  127. #define NS_STYLE_AZIMUTH_FAR_LEFT         0x01
  128. #define NS_STYLE_AZIMUTH_LEFT             0x02
  129. #define NS_STYLE_AZIMUTH_CENTER_LEFT      0x03
  130. #define NS_STYLE_AZIMUTH_CENTER           0x04
  131. #define NS_STYLE_AZIMUTH_CENTER_RIGHT     0x05
  132. #define NS_STYLE_AZIMUTH_RIGHT            0x06
  133. #define NS_STYLE_AZIMUTH_FAR_RIGHT        0x07
  134. #define NS_STYLE_AZIMUTH_RIGHT_SIDE       0x08
  135. #define NS_STYLE_AZIMUTH_BEHIND           0x80  // bits
  136. #define NS_STYLE_AZIMUTH_LEFTWARDS        0x10  // bits
  137. #define NS_STYLE_AZIMUTH_RIGHTWARDS       0x20  // bits
  138.  
  139. // See nsStyleAural
  140. #define NS_STYLE_ELEVATION_BELOW          1
  141. #define NS_STYLE_ELEVATION_LEVEL          2
  142. #define NS_STYLE_ELEVATION_ABOVE          3
  143. #define NS_STYLE_ELEVATION_HIGHER         4
  144. #define NS_STYLE_ELEVATION_LOWER          5
  145.  
  146. // See nsStyleAural
  147. #define NS_STYLE_PITCH_X_LOW              1
  148. #define NS_STYLE_PITCH_LOW                2
  149. #define NS_STYLE_PITCH_MEDIUM             3
  150. #define NS_STYLE_PITCH_HIGH               4
  151. #define NS_STYLE_PITCH_X_HIGH             5
  152.  
  153. // See nsStyleAural
  154. #define NS_STYLE_SPEAK_NONE               0
  155. #define NS_STYLE_SPEAK_NORMAL             1
  156. #define NS_STYLE_SPEAK_SPELL_OUT          2
  157.  
  158. // See nsStyleAural 
  159. #define NS_STYLE_SPEAK_HEADER_ONCE        0
  160. #define NS_STYLE_SPEAK_HEADER_ALWAYS      1
  161.  
  162. // See nsStyleAural 
  163. #define NS_STYLE_SPEAK_NUMERAL_DIGITS     0
  164. #define NS_STYLE_SPEAK_NUMERAL_CONTINUOUS 1
  165.  
  166. // See nsStyleAural 
  167. #define NS_STYLE_SPEAK_PUNCTUATION_NONE   0
  168. #define NS_STYLE_SPEAK_PUNCTUATION_CODE   1
  169.  
  170. // See nsStyleAural 
  171. #define NS_STYLE_SPEECH_RATE_X_SLOW       0
  172. #define NS_STYLE_SPEECH_RATE_SLOW         1
  173. #define NS_STYLE_SPEECH_RATE_MEDIUM       2
  174. #define NS_STYLE_SPEECH_RATE_FAST         3
  175. #define NS_STYLE_SPEECH_RATE_X_FAST       4
  176. #define NS_STYLE_SPEECH_RATE_FASTER       10
  177. #define NS_STYLE_SPEECH_RATE_SLOWER       11
  178.  
  179. // See nsStyleAural 
  180. #define NS_STYLE_VOLUME_SILENT            0
  181. #define NS_STYLE_VOLUME_X_SOFT            1
  182. #define NS_STYLE_VOLUME_SOFT              2
  183. #define NS_STYLE_VOLUME_MEDIUM            3
  184. #define NS_STYLE_VOLUME_LOUD              4
  185. #define NS_STYLE_VOLUME_X_LOUD            5
  186.  
  187. // See nsStyleColor
  188. #define NS_STYLE_COLOR_TRANSPARENT        0
  189. #define NS_STYLE_COLOR_INVERT             1
  190. #define NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR      2
  191.  
  192. // See nsStyleColor
  193. #define NS_COLOR_MOZ_HYPERLINKTEXT              -1
  194. #define NS_COLOR_MOZ_VISITEDHYPERLINKTEXT       -2
  195. #define NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT        -3
  196. #define NS_COLOR_CURRENTCOLOR                   -4
  197.  
  198. // See nsStyleBackground
  199. #define NS_STYLE_BG_COLOR_TRANSPARENT           0x01
  200. #define NS_STYLE_BG_IMAGE_NONE                  0x02
  201. #define NS_STYLE_BG_X_POSITION_PERCENT          0x04
  202. #define NS_STYLE_BG_X_POSITION_LENGTH           0x08
  203. #define NS_STYLE_BG_Y_POSITION_PERCENT          0x10
  204. #define NS_STYLE_BG_Y_POSITION_LENGTH           0x20
  205.  
  206. // See nsStyleBackground
  207. #define NS_STYLE_BG_ATTACHMENT_SCROLL     0
  208. #define NS_STYLE_BG_ATTACHMENT_FIXED      1
  209.  
  210. // See nsStyleBackground
  211. #define NS_STYLE_BG_CLIP_BORDER           0
  212. #define NS_STYLE_BG_CLIP_PADDING          1
  213.  
  214. // See nsStyleBackground
  215. #define NS_STYLE_BG_INLINE_POLICY_EACH_BOX      0
  216. #define NS_STYLE_BG_INLINE_POLICY_CONTINUOUS    1
  217. #define NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX  2
  218.  
  219. // See nsStyleBackground
  220. #define NS_STYLE_BG_ORIGIN_BORDER         0
  221. #define NS_STYLE_BG_ORIGIN_PADDING        1
  222. #define NS_STYLE_BG_ORIGIN_CONTENT        2
  223.  
  224. // See nsStyleBackground
  225. #define NS_STYLE_BG_REPEAT_OFF                  0x00
  226. #define NS_STYLE_BG_REPEAT_X                    0x01
  227. #define NS_STYLE_BG_REPEAT_Y                    0x02
  228. #define NS_STYLE_BG_REPEAT_XY                   0x03
  229.  
  230. // See nsStyleTable
  231. #define NS_STYLE_BORDER_COLLAPSE                0
  232. #define NS_STYLE_BORDER_SEPARATE                1
  233.  
  234. // Possible enumerated specified values of border-*-width, used by nsCSSMargin
  235. #define NS_STYLE_BORDER_WIDTH_THIN              0
  236. #define NS_STYLE_BORDER_WIDTH_MEDIUM            1
  237. #define NS_STYLE_BORDER_WIDTH_THICK             2
  238. // XXX chopping block #define NS_STYLE_BORDER_WIDTH_LENGTH_VALUE      3
  239.  
  240. // See nsStyleBorder mBorderStyle
  241. #define NS_STYLE_BORDER_STYLE_NONE              0
  242. #define NS_STYLE_BORDER_STYLE_GROOVE            1
  243. #define NS_STYLE_BORDER_STYLE_RIDGE             2
  244. #define NS_STYLE_BORDER_STYLE_DOTTED            3
  245. #define NS_STYLE_BORDER_STYLE_DASHED            4
  246. #define NS_STYLE_BORDER_STYLE_SOLID             5
  247. #define NS_STYLE_BORDER_STYLE_DOUBLE            6
  248. #define NS_STYLE_BORDER_STYLE_INSET             7
  249. #define NS_STYLE_BORDER_STYLE_OUTSET            8
  250. #define NS_STYLE_BORDER_STYLE_HIDDEN            9
  251. #define NS_STYLE_BORDER_STYLE_BG_INSET          10
  252. #define NS_STYLE_BORDER_STYLE_BG_OUTSET         11
  253. #define NS_STYLE_BORDER_STYLE_BG_SOLID          12
  254. #define NS_STYLE_BORDER_STYLE_AUTO              13 // for outline-style only
  255. // a bit ORed onto the style for table border collapsing indicating that the style was 
  256. // derived from a table with its rules attribute set
  257. #define NS_STYLE_BORDER_STYLE_RULES_MARKER      0x10  
  258.  
  259. // See nsStyleDisplay
  260. #define NS_STYLE_CLEAR_NONE                     0
  261. #define NS_STYLE_CLEAR_LEFT                     1
  262. #define NS_STYLE_CLEAR_RIGHT                    2
  263. #define NS_STYLE_CLEAR_LEFT_AND_RIGHT           3
  264. #define NS_STYLE_CLEAR_LINE                     4
  265. #define NS_STYLE_CLEAR_BLOCK                    5
  266. #define NS_STYLE_CLEAR_COLUMN                   6
  267. #define NS_STYLE_CLEAR_PAGE                     7
  268. #define NS_STYLE_CLEAR_LAST_VALUE NS_STYLE_CLEAR_PAGE
  269.  
  270. // See
  271. #define NS_STYLE_CONTENT_OPEN_QUOTE             0
  272. #define NS_STYLE_CONTENT_CLOSE_QUOTE            1
  273. #define NS_STYLE_CONTENT_NO_OPEN_QUOTE          2
  274. #define NS_STYLE_CONTENT_NO_CLOSE_QUOTE         3
  275.  
  276. // See nsStyleColor
  277. #define NS_STYLE_CURSOR_AUTO                    1
  278. #define NS_STYLE_CURSOR_CROSSHAIR               2
  279. #define NS_STYLE_CURSOR_DEFAULT                 3    // ie: an arrow
  280. #define NS_STYLE_CURSOR_POINTER                 4    // for links
  281. #define NS_STYLE_CURSOR_MOVE                    5 
  282. #define NS_STYLE_CURSOR_E_RESIZE                6     
  283. #define NS_STYLE_CURSOR_NE_RESIZE               7      
  284. #define NS_STYLE_CURSOR_NW_RESIZE               8      
  285. #define NS_STYLE_CURSOR_N_RESIZE                9     
  286. #define NS_STYLE_CURSOR_SE_RESIZE               10      
  287. #define NS_STYLE_CURSOR_SW_RESIZE               11     
  288. #define NS_STYLE_CURSOR_S_RESIZE                12    
  289. #define NS_STYLE_CURSOR_W_RESIZE                13    
  290. #define NS_STYLE_CURSOR_TEXT                    14   // ie: i-beam
  291. #define NS_STYLE_CURSOR_WAIT                    15
  292. #define NS_STYLE_CURSOR_HELP                    16
  293. #define NS_STYLE_CURSOR_COPY                    17   // CSS3
  294. #define NS_STYLE_CURSOR_ALIAS                   18
  295. #define NS_STYLE_CURSOR_CONTEXT_MENU            19
  296. #define NS_STYLE_CURSOR_CELL                    20
  297. #define NS_STYLE_CURSOR_GRAB                    21
  298. #define NS_STYLE_CURSOR_GRABBING                22
  299. #define NS_STYLE_CURSOR_SPINNING                23
  300. #define NS_STYLE_CURSOR_MOZ_ZOOM_IN             24
  301. #define NS_STYLE_CURSOR_MOZ_ZOOM_OUT            25
  302. #define NS_STYLE_CURSOR_NOT_ALLOWED             26
  303. #define NS_STYLE_CURSOR_COL_RESIZE              27
  304. #define NS_STYLE_CURSOR_ROW_RESIZE              28
  305. #define NS_STYLE_CURSOR_NO_DROP                 29
  306. #define NS_STYLE_CURSOR_VERTICAL_TEXT           30
  307. #define NS_STYLE_CURSOR_ALL_SCROLL              31
  308. #define NS_STYLE_CURSOR_NESW_RESIZE             32
  309. #define NS_STYLE_CURSOR_NWSE_RESIZE             33
  310. #define NS_STYLE_CURSOR_NS_RESIZE               34
  311. #define NS_STYLE_CURSOR_EW_RESIZE               35
  312.  
  313. // See nsStyleDisplay
  314. #define NS_STYLE_DIRECTION_LTR                  0
  315. #define NS_STYLE_DIRECTION_RTL                  1
  316. #define NS_STYLE_DIRECTION_INHERIT              2
  317.  
  318. // See nsStyleDisplay
  319. #define NS_STYLE_DISPLAY_NONE                   0
  320. #define NS_STYLE_DISPLAY_BLOCK                  1
  321. #define NS_STYLE_DISPLAY_INLINE                 2
  322. #define NS_STYLE_DISPLAY_INLINE_BLOCK           3
  323. #define NS_STYLE_DISPLAY_LIST_ITEM              4
  324. #define NS_STYLE_DISPLAY_MARKER                 5
  325. #define NS_STYLE_DISPLAY_RUN_IN                 6
  326. #define NS_STYLE_DISPLAY_COMPACT                7
  327. #define NS_STYLE_DISPLAY_TABLE                  8
  328. #define NS_STYLE_DISPLAY_INLINE_TABLE           9
  329. #define NS_STYLE_DISPLAY_TABLE_ROW_GROUP        10
  330. #define NS_STYLE_DISPLAY_TABLE_COLUMN           11
  331. #define NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP     12
  332. #define NS_STYLE_DISPLAY_TABLE_HEADER_GROUP     13
  333. #define NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP     14
  334. #define NS_STYLE_DISPLAY_TABLE_ROW              15
  335. #define NS_STYLE_DISPLAY_TABLE_CELL             16
  336. #define NS_STYLE_DISPLAY_TABLE_CAPTION          17
  337. #define NS_STYLE_DISPLAY_BOX                    18
  338. #define NS_STYLE_DISPLAY_INLINE_BOX             19
  339. #define NS_STYLE_DISPLAY_GRID                   20
  340. #define NS_STYLE_DISPLAY_INLINE_GRID            21
  341. #define NS_STYLE_DISPLAY_GRID_GROUP             22
  342. #define NS_STYLE_DISPLAY_GRID_LINE              23
  343. #define NS_STYLE_DISPLAY_STACK                  24
  344. #define NS_STYLE_DISPLAY_INLINE_STACK           25
  345. #define NS_STYLE_DISPLAY_DECK                   26
  346. #define NS_STYLE_DISPLAY_POPUP                  27
  347. #define NS_STYLE_DISPLAY_GROUPBOX               28
  348.  
  349. // See nsStyleDisplay
  350. #define NS_STYLE_FLOAT_NONE                     0
  351. #define NS_STYLE_FLOAT_LEFT                     1
  352. #define NS_STYLE_FLOAT_RIGHT                    2
  353.  
  354. // See nsStyleFont
  355. #define NS_STYLE_FONT_STYLE_NORMAL              0
  356. #define NS_STYLE_FONT_STYLE_ITALIC              1
  357. #define NS_STYLE_FONT_STYLE_OBLIQUE             2
  358.  
  359. // See nsStyleFont
  360. #define NS_STYLE_FONT_VARIANT_NORMAL            0
  361. #define NS_STYLE_FONT_VARIANT_SMALL_CAPS        1
  362.  
  363. // See nsStyleFont
  364. #define NS_STYLE_FONT_WEIGHT_NORMAL             400
  365. #define NS_STYLE_FONT_WEIGHT_BOLD               700
  366. #define NS_STYLE_FONT_WEIGHT_BOLDER             1
  367. #define NS_STYLE_FONT_WEIGHT_LIGHTER            -1
  368.  
  369. // See nsStyleFont
  370. #define NS_STYLE_FONT_SIZE_XXSMALL              0
  371. #define NS_STYLE_FONT_SIZE_XSMALL               1
  372. #define NS_STYLE_FONT_SIZE_SMALL                2
  373. #define NS_STYLE_FONT_SIZE_MEDIUM               3
  374. #define NS_STYLE_FONT_SIZE_LARGE                4
  375. #define NS_STYLE_FONT_SIZE_XLARGE               5
  376. #define NS_STYLE_FONT_SIZE_XXLARGE              6
  377. #define NS_STYLE_FONT_SIZE_XXXLARGE             7  // Only used by <font size="7">. Not specifiable in CSS.
  378. #define NS_STYLE_FONT_SIZE_LARGER               8
  379. #define NS_STYLE_FONT_SIZE_SMALLER              9
  380.  
  381. // See nsStyleFont
  382. #define NS_STYLE_FONT_STRETCH_ULTRA_CONDENSED   -4
  383. #define NS_STYLE_FONT_STRETCH_EXTRA_CONDENSED   -3
  384. #define NS_STYLE_FONT_STRETCH_CONDENSED         -2
  385. #define NS_STYLE_FONT_STRETCH_SEMI_CONDENSED    -1
  386. #define NS_STYLE_FONT_STRETCH_NORMAL            0
  387. #define NS_STYLE_FONT_STRETCH_SEMI_EXPANDED     1
  388. #define NS_STYLE_FONT_STRETCH_EXPANDED          2
  389. #define NS_STYLE_FONT_STRETCH_EXTRA_EXPANDED    3
  390. #define NS_STYLE_FONT_STRETCH_ULTRA_EXPANDED    4
  391. #define NS_STYLE_FONT_STRETCH_WIDER             10
  392. #define NS_STYLE_FONT_STRETCH_NARROWER          -10
  393.  
  394. // See nsStyleFont mFlags
  395. #define NS_STYLE_FONT_DEFAULT                   0x00
  396. #define NS_STYLE_FONT_FACE_MASK                 0xFF // used to flag generic fonts
  397.  
  398. // See nsStyleFont - system fonts
  399. #define NS_STYLE_FONT_CAPTION                   1        // css2
  400. #define NS_STYLE_FONT_ICON                      2
  401. #define NS_STYLE_FONT_MENU                      3
  402. #define NS_STYLE_FONT_MESSAGE_BOX               4
  403. #define NS_STYLE_FONT_SMALL_CAPTION             5
  404. #define NS_STYLE_FONT_STATUS_BAR                6
  405. #define NS_STYLE_FONT_WINDOW                                        7        // css3
  406. #define NS_STYLE_FONT_DOCUMENT                                    8
  407. #define NS_STYLE_FONT_WORKSPACE                                    9
  408. #define NS_STYLE_FONT_DESKTOP                                        10
  409. #define NS_STYLE_FONT_INFO                                            11
  410. #define NS_STYLE_FONT_DIALOG                                        12
  411. #define NS_STYLE_FONT_BUTTON                                        13
  412. #define NS_STYLE_FONT_PULL_DOWN_MENU                        14
  413. #define NS_STYLE_FONT_LIST                                            15
  414. #define NS_STYLE_FONT_FIELD                                            16
  415.  
  416. // See nsStylePosition.mPosition
  417. #define NS_STYLE_POSITION_STATIC                0
  418. #define NS_STYLE_POSITION_RELATIVE              1
  419. #define NS_STYLE_POSITION_ABSOLUTE              2
  420. #define NS_STYLE_POSITION_FIXED                 3
  421.  
  422. // See nsStylePosition.mClip
  423. #define NS_STYLE_CLIP_AUTO                      0x00
  424. #define NS_STYLE_CLIP_RECT                      0x01
  425. #define NS_STYLE_CLIP_TYPE_MASK                 0x0F
  426. #define NS_STYLE_CLIP_LEFT_AUTO                 0x10
  427. #define NS_STYLE_CLIP_TOP_AUTO                  0x20
  428. #define NS_STYLE_CLIP_RIGHT_AUTO                0x40
  429. #define NS_STYLE_CLIP_BOTTOM_AUTO               0x80
  430.  
  431. // FRAME/FRAMESET/IFRAME specific values including backward compatibility. Boolean values with
  432. // the same meaning (e.g. 1 & yes) may need to be distinguished for correct mode processing 
  433. #define NS_STYLE_FRAME_YES                      0
  434. #define NS_STYLE_FRAME_NO                       1
  435. #define NS_STYLE_FRAME_0                        2
  436. #define NS_STYLE_FRAME_1                        3
  437. #define NS_STYLE_FRAME_ON                       4
  438. #define NS_STYLE_FRAME_OFF                      5
  439. #define NS_STYLE_FRAME_AUTO                     6
  440. #define NS_STYLE_FRAME_SCROLL                   7
  441. #define NS_STYLE_FRAME_NOSCROLL                 8
  442.  
  443. // See nsStylePosition.mOverflow
  444. #define NS_STYLE_OVERFLOW_VISIBLE               0
  445. #define NS_STYLE_OVERFLOW_HIDDEN                1
  446. #define NS_STYLE_OVERFLOW_SCROLL                2
  447. #define NS_STYLE_OVERFLOW_AUTO                  3
  448. #define NS_STYLE_OVERFLOW_CLIP                  4
  449. #define NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL 5
  450. #define NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL   6
  451.  
  452. // See nsStyleList
  453. #define NS_STYLE_LIST_STYLE_NONE                  0
  454. #define NS_STYLE_LIST_STYLE_DISC                  1
  455. #define NS_STYLE_LIST_STYLE_CIRCLE                2
  456. #define NS_STYLE_LIST_STYLE_SQUARE                3
  457. #define NS_STYLE_LIST_STYLE_DECIMAL               4
  458. #define NS_STYLE_LIST_STYLE_DECIMAL_LEADING_ZERO  5
  459. #define NS_STYLE_LIST_STYLE_LOWER_ROMAN           6
  460. #define NS_STYLE_LIST_STYLE_UPPER_ROMAN           7
  461. #define NS_STYLE_LIST_STYLE_LOWER_GREEK           8
  462. #define NS_STYLE_LIST_STYLE_LOWER_ALPHA           9
  463. #define NS_STYLE_LIST_STYLE_LOWER_LATIN           9   // == ALPHA
  464. #define NS_STYLE_LIST_STYLE_UPPER_ALPHA           10
  465. #define NS_STYLE_LIST_STYLE_UPPER_LATIN           10  // == ALPHA
  466. #define NS_STYLE_LIST_STYLE_HEBREW                11
  467. #define NS_STYLE_LIST_STYLE_ARMENIAN              12
  468. #define NS_STYLE_LIST_STYLE_GEORGIAN              13
  469. #define NS_STYLE_LIST_STYLE_CJK_IDEOGRAPHIC       14
  470. #define NS_STYLE_LIST_STYLE_HIRAGANA              15
  471. #define NS_STYLE_LIST_STYLE_KATAKANA              16
  472. #define NS_STYLE_LIST_STYLE_HIRAGANA_IROHA        17
  473. #define NS_STYLE_LIST_STYLE_KATAKANA_IROHA        18
  474. #define NS_STYLE_LIST_STYLE_OLD_LOWER_ROMAN       19
  475. #define NS_STYLE_LIST_STYLE_OLD_UPPER_ROMAN       20
  476. #define NS_STYLE_LIST_STYLE_OLD_LOWER_ALPHA       21
  477. #define NS_STYLE_LIST_STYLE_OLD_UPPER_ALPHA       22
  478. #define NS_STYLE_LIST_STYLE_OLD_DECIMAL           23
  479. #define NS_STYLE_LIST_STYLE_MOZ_CJK_HEAVENLY_STEM     24
  480. #define NS_STYLE_LIST_STYLE_MOZ_CJK_EARTHLY_BRANCH    25
  481. #define NS_STYLE_LIST_STYLE_MOZ_TRAD_CHINESE_INFORMAL 26
  482. #define NS_STYLE_LIST_STYLE_MOZ_TRAD_CHINESE_FORMAL   27
  483. #define NS_STYLE_LIST_STYLE_MOZ_SIMP_CHINESE_INFORMAL 28
  484. #define NS_STYLE_LIST_STYLE_MOZ_SIMP_CHINESE_FORMAL   29
  485. #define NS_STYLE_LIST_STYLE_MOZ_JAPANESE_INFORMAL     30
  486. #define NS_STYLE_LIST_STYLE_MOZ_JAPANESE_FORMAL       31
  487. #define NS_STYLE_LIST_STYLE_MOZ_ARABIC_INDIC          32
  488. #define NS_STYLE_LIST_STYLE_MOZ_PERSIAN               33
  489. #define NS_STYLE_LIST_STYLE_MOZ_URDU                  34 
  490. #define NS_STYLE_LIST_STYLE_MOZ_DEVANAGARI            35
  491. #define NS_STYLE_LIST_STYLE_MOZ_GURMUKHI              36
  492. #define NS_STYLE_LIST_STYLE_MOZ_GUJARATI              37
  493. #define NS_STYLE_LIST_STYLE_MOZ_ORIYA                 38
  494. #define NS_STYLE_LIST_STYLE_MOZ_KANNADA               39
  495. #define NS_STYLE_LIST_STYLE_MOZ_MALAYALAM             40
  496. #define NS_STYLE_LIST_STYLE_MOZ_BENGALI               41
  497. #define NS_STYLE_LIST_STYLE_MOZ_TAMIL                 42
  498. #define NS_STYLE_LIST_STYLE_MOZ_TELUGU                43
  499. #define NS_STYLE_LIST_STYLE_MOZ_THAI                  44
  500. #define NS_STYLE_LIST_STYLE_MOZ_LAO                   45
  501. #define NS_STYLE_LIST_STYLE_MOZ_MYANMAR               46
  502. #define NS_STYLE_LIST_STYLE_MOZ_KHMER                 47
  503. #define NS_STYLE_LIST_STYLE_MOZ_HANGUL                48
  504. #define NS_STYLE_LIST_STYLE_MOZ_HANGUL_CONSONANT      49
  505. #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME     50
  506. #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_NUMERIC      51
  507. #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_AM  52
  508. #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ER  53
  509. #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ET  54
  510.  
  511. // See nsStyleList
  512. #define NS_STYLE_LIST_STYLE_POSITION_INSIDE     0
  513. #define NS_STYLE_LIST_STYLE_POSITION_OUTSIDE    1
  514.  
  515. // See nsStyleMargin
  516. #define NS_STYLE_MARGIN_SIZE_AUTO               0
  517.  
  518. // See nsStyleText
  519. // 
  520. // Note: make sure the numbers are less than the numbers that start
  521. // the vertical_align values below!
  522. #define NS_STYLE_TEXT_ALIGN_DEFAULT             0
  523. #define NS_STYLE_TEXT_ALIGN_LEFT                1
  524. #define NS_STYLE_TEXT_ALIGN_RIGHT               2
  525. #define NS_STYLE_TEXT_ALIGN_CENTER              3
  526. #define NS_STYLE_TEXT_ALIGN_JUSTIFY             4
  527. #define NS_STYLE_TEXT_ALIGN_CHAR                5   //align based on a certain character, for table cell
  528. #define NS_STYLE_TEXT_ALIGN_MOZ_CENTER          6
  529. #define NS_STYLE_TEXT_ALIGN_MOZ_RIGHT           7
  530. #define NS_STYLE_TEXT_ALIGN_MOZ_LEFT            8
  531.  
  532. // See nsStyleText, nsStyleFont
  533. #define NS_STYLE_TEXT_DECORATION_NONE           0
  534. #define NS_STYLE_TEXT_DECORATION_UNDERLINE      NS_FONT_DECORATION_UNDERLINE
  535. #define NS_STYLE_TEXT_DECORATION_OVERLINE       NS_FONT_DECORATION_OVERLINE
  536. #define NS_STYLE_TEXT_DECORATION_LINE_THROUGH   NS_FONT_DECORATION_LINE_THROUGH
  537. #define NS_STYLE_TEXT_DECORATION_BLINK          0x08
  538. #define NS_STYLE_TEXT_DECORATION_OVERRIDE_ALL   0x10
  539. #define NS_STYLE_TEXT_DECORATION_PREF_ANCHORS   0x20
  540. #define NS_STYLE_TEXT_DECORATION_LINES_MASK     (NS_STYLE_TEXT_DECORATION_UNDERLINE | NS_STYLE_TEXT_DECORATION_OVERLINE | NS_STYLE_TEXT_DECORATION_LINE_THROUGH)
  541.  
  542. // See nsStyleText
  543. #define NS_STYLE_TEXT_TRANSFORM_NONE            0
  544. #define NS_STYLE_TEXT_TRANSFORM_CAPITALIZE      1
  545. #define NS_STYLE_TEXT_TRANSFORM_LOWERCASE       2
  546. #define NS_STYLE_TEXT_TRANSFORM_UPPERCASE       3
  547.  
  548. // See nsStyleText
  549. // Note: these values pickup after the text-align values because there
  550. // are a few html cases where an object can have both types of
  551. // alignment applied with a single attribute
  552. #define NS_STYLE_VERTICAL_ALIGN_BASELINE             10
  553. #define NS_STYLE_VERTICAL_ALIGN_SUB                  11
  554. #define NS_STYLE_VERTICAL_ALIGN_SUPER                12
  555. #define NS_STYLE_VERTICAL_ALIGN_TOP                  13
  556. #define NS_STYLE_VERTICAL_ALIGN_TEXT_TOP             14
  557. #define NS_STYLE_VERTICAL_ALIGN_MIDDLE               15
  558. #define NS_STYLE_VERTICAL_ALIGN_TEXT_BOTTOM          16
  559. #define NS_STYLE_VERTICAL_ALIGN_BOTTOM               17
  560. #define NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE 18
  561.  
  562. // See nsStyleDisplay
  563. #define NS_STYLE_VISIBILITY_HIDDEN              0
  564. #define NS_STYLE_VISIBILITY_VISIBLE             1
  565. #define NS_STYLE_VISIBILITY_COLLAPSE            2
  566.  
  567. // See nsStyleText
  568. #define NS_STYLE_WHITESPACE_NORMAL              0
  569. #define NS_STYLE_WHITESPACE_PRE                 1
  570. #define NS_STYLE_WHITESPACE_NOWRAP              2
  571. #define NS_STYLE_WHITESPACE_MOZ_PRE_WRAP        3
  572.  
  573. // See nsStyleText
  574. #define NS_STYLE_UNICODE_BIDI_NORMAL            0
  575. #define NS_STYLE_UNICODE_BIDI_EMBED             1
  576. #define NS_STYLE_UNICODE_BIDI_OVERRIDE          2
  577.  
  578. // See nsStyleTable (here for HTML 4.0 for now, should probably change to side flags)
  579. #define NS_STYLE_TABLE_FRAME_NONE               0
  580. #define NS_STYLE_TABLE_FRAME_ABOVE              1
  581. #define NS_STYLE_TABLE_FRAME_BELOW              2
  582. #define NS_STYLE_TABLE_FRAME_HSIDES             3
  583. #define NS_STYLE_TABLE_FRAME_VSIDES             4
  584. #define NS_STYLE_TABLE_FRAME_LEFT               5
  585. #define NS_STYLE_TABLE_FRAME_RIGHT              6
  586. #define NS_STYLE_TABLE_FRAME_BOX                7
  587. #define NS_STYLE_TABLE_FRAME_BORDER             8
  588.  
  589. // See nsStyleTable
  590. #define NS_STYLE_TABLE_RULES_NONE               0
  591. #define NS_STYLE_TABLE_RULES_GROUPS             1
  592. #define NS_STYLE_TABLE_RULES_ROWS               2
  593. #define NS_STYLE_TABLE_RULES_COLS               3
  594. #define NS_STYLE_TABLE_RULES_ALL                4
  595.  
  596. #define NS_STYLE_TABLE_COLS_NONE                (-1)
  597. #define NS_STYLE_TABLE_COLS_ALL                 PRInt32(1 << 30)
  598.  
  599. #define NS_STYLE_TABLE_LAYOUT_AUTO              0
  600. #define NS_STYLE_TABLE_LAYOUT_FIXED             1
  601.  
  602. #define NS_STYLE_TABLE_EMPTY_CELLS_HIDE            0
  603. #define NS_STYLE_TABLE_EMPTY_CELLS_SHOW            1
  604. #define NS_STYLE_TABLE_EMPTY_CELLS_SHOW_BACKGROUND 2
  605.  
  606. // CAPTION_SIDE uses NS_SIDE_*
  607.  
  608. // constants for cell "scope" attribute
  609. #define NS_STYLE_CELL_SCOPE_ROW                 0
  610. #define NS_STYLE_CELL_SCOPE_COL                 1
  611. #define NS_STYLE_CELL_SCOPE_ROWGROUP            2
  612. #define NS_STYLE_CELL_SCOPE_COLGROUP            3
  613.  
  614. // See nsStylePage
  615. #define NS_STYLE_PAGE_MARKS_NONE                0x00
  616. #define NS_STYLE_PAGE_MARKS_CROP                0x01
  617. #define NS_STYLE_PAGE_MARKS_REGISTER            0x02
  618.  
  619. // See nsStylePage
  620. #define NS_STYLE_PAGE_SIZE_AUTO                 0
  621. #define NS_STYLE_PAGE_SIZE_PORTRAIT             1
  622. #define NS_STYLE_PAGE_SIZE_LANDSCAPE            2
  623.  
  624. // See nsStyleBreaks
  625. #define NS_STYLE_PAGE_BREAK_AUTO                0
  626. #define NS_STYLE_PAGE_BREAK_ALWAYS              1
  627. #define NS_STYLE_PAGE_BREAK_AVOID               2
  628. #define NS_STYLE_PAGE_BREAK_LEFT                3
  629. #define NS_STYLE_PAGE_BREAK_RIGHT               4
  630.  
  631. // See nsStyleColumn
  632. #define NS_STYLE_COLUMN_COUNT_AUTO              0
  633. #define NS_STYLE_COLUMN_COUNT_UNLIMITED         (-1)
  634.  
  635. #ifdef MOZ_SVG
  636. // Some of our constants must map to the same values as those defined in
  637. // nsISVG{,Path,Glyph}GeometrySource.idl/
  638. // I don't want to add a dependency on the SVG module
  639. // everywhere by #include'ing nsISVG{,Path,Glyph}GeometrySource.h, so these consts
  640. // have to be kept in sync manually.
  641.  
  642. // dominant-baseline
  643. #define NS_STYLE_DOMINANT_BASELINE_AUTO              0
  644. #define NS_STYLE_DOMINANT_BASELINE_USE_SCRIPT        1
  645. #define NS_STYLE_DOMINANT_BASELINE_NO_CHANGE         2
  646. #define NS_STYLE_DOMINANT_BASELINE_RESET_SIZE        3
  647. #define NS_STYLE_DOMINANT_BASELINE_IDEOGRAPHIC       4
  648. #define NS_STYLE_DOMINANT_BASELINE_ALPHABETIC        5
  649. #define NS_STYLE_DOMINANT_BASELINE_HANGING           6
  650. #define NS_STYLE_DOMINANT_BASELINE_MATHEMATICAL      7
  651. #define NS_STYLE_DOMINANT_BASELINE_CENTRAL           8
  652. #define NS_STYLE_DOMINANT_BASELINE_MIDDLE            9
  653. #define NS_STYLE_DOMINANT_BASELINE_TEXT_AFTER_EDGE  10
  654. #define NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE 11
  655.  
  656. // fill-rule
  657. #define NS_STYLE_FILL_RULE_NONZERO              0 /* == nsISVGGeometrySource::FILL_RULE_NONZERO */
  658. #define NS_STYLE_FILL_RULE_EVENODD              1 /* == nsISVGGeometrySource::FILL_RULE_EVENODD */
  659.  
  660. // pointer-events
  661. #define NS_STYLE_POINTER_EVENTS_NONE            0
  662. #define NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED  1
  663. #define NS_STYLE_POINTER_EVENTS_VISIBLEFILL     2
  664. #define NS_STYLE_POINTER_EVENTS_VISIBLESTROKE   3
  665. #define NS_STYLE_POINTER_EVENTS_VISIBLE         4
  666. #define NS_STYLE_POINTER_EVENTS_PAINTED         5
  667. #define NS_STYLE_POINTER_EVENTS_FILL            6
  668. #define NS_STYLE_POINTER_EVENTS_STROKE          7
  669. #define NS_STYLE_POINTER_EVENTS_ALL             8
  670.  
  671. // shape-rendering
  672. #define NS_STYLE_SHAPE_RENDERING_AUTO               0 /* == nsISVGPathGeometrySource::SHAPE_RENDERING_AUTO */
  673. #define NS_STYLE_SHAPE_RENDERING_OPTIMIZESPEED      1 /* == nsISVGPathGeometrySource::SHAPE_RENDERING_OPTIMIZESPEED */
  674. #define NS_STYLE_SHAPE_RENDERING_CRISPEDGES         2 /* == nsISVGPathGeometrySource::SHAPE_RENDERING_CRISPEDGES */
  675. #define NS_STYLE_SHAPE_RENDERING_GEOMETRICPRECISION 3 /* == nsISVGPathGeometrySource::SHAPE_RENDERING_GEOMETRICPRECISION */
  676.  
  677.  
  678. // stroke-linecap
  679. #define NS_STYLE_STROKE_LINECAP_BUTT            0 /* == nsISVGGeometrySource::STROKE_LINECAP_BUTT */
  680. #define NS_STYLE_STROKE_LINECAP_ROUND           1 /* == nsISVGGeometrySource::STROKE_LINECAP_ROUND */
  681. #define NS_STYLE_STROKE_LINECAP_SQUARE          2 /* == nsISVGGeometrySource::STROKE_LINECAP_SQUARE */
  682.  
  683. // stroke-linejoin
  684. #define NS_STYLE_STROKE_LINEJOIN_MITER          0 /* == nsISVGGeometrySource::STROKE_LINEJOIN_MITER */
  685. #define NS_STYLE_STROKE_LINEJOIN_ROUND          1 /* == nsISVGGeometrySource::STROKE_LINEJOIN_ROUND */
  686. #define NS_STYLE_STROKE_LINEJOIN_BEVEL          2 /* == nsISVGGeometrySource::STROKE_LINEJOIN_BEVEL */
  687.  
  688. // text-anchor
  689. #define NS_STYLE_TEXT_ANCHOR_START              0 
  690. #define NS_STYLE_TEXT_ANCHOR_MIDDLE             1 
  691. #define NS_STYLE_TEXT_ANCHOR_END                2 
  692.  
  693. // text-rendering
  694. #define NS_STYLE_TEXT_RENDERING_AUTO               0 /* == nsISVGGlyphGeometrySource::TEXT_RENDERING_AUTO */
  695. #define NS_STYLE_TEXT_RENDERING_OPTIMIZESPEED      1 /* == nsISVGG.G.S.::TEXT_RENDERING_OPTIMIZESPEED */
  696. #define NS_STYLE_TEXT_RENDERING_OPTIMIZELEGIBILITY 2 /* == nsISVGG.G.S.::TEXT_RENDERING_OPTIMIZELEGIBILITY */
  697. #define NS_STYLE_TEXT_RENDERING_GEOMETRICPRECISION 3 /* == nsISVGG.G.S.::TEXT_RENDERING_GEOMETRICPRECISION */
  698.  
  699. #endif // MOZ_SVG
  700.  
  701. #endif /* nsStyleConsts_h___ */
  702.